﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WebApiClient;
using WebApiClient.Attributes;

namespace ARchGL.Platform.Qianbian
{
    [TraceFilter(OutputTarget = OutputTarget.Console)]
    public interface IProjectInfoApi : IHttpApi
    {
        /// <summary>
        /// 获取企业项目档案
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project")]
        ITask<AjaxResponse<List<ProjectsApiDto>>> GetProjectPagedList(int page, int index);

        /// <summary>
        /// 获取项目成员档案
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="projectId">项目标识</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project/{projectId}/worker")]
        ITask<AjaxResponse<List<ProjectUsersApiDto>>> GetProjectUserPagedList(int page, Guid projectId, int index);

        /// <summary>
        /// 获取项目设备档案
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="projectId">项目标识</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project/{projectId}/device")]
        ITask<AjaxResponse<List<ProjectDevicesApiDto>>> GetProjectDevicePagedList(int page, Guid projectId, int index);

        /// <summary>
        /// 获取项目考勤数据
        /// </summary>
        /// <param name="day">格式为yyyy-MM-dd，默认为当天</param>
        /// <param name="page">页码</param>
        /// <param name="projectId">项目标识</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project/{projectId}/attendance")]
        ITask<AjaxResponse<List<ProjectAttendancesApiDto>>> GetProjectAttendancePagedList(string day, int page, Guid projectId, int index);

        /// <summary>
        /// 获取项目环境监控数据
        /// </summary>
        /// <param name="startTime">起始时间戳，长度为10</param>
        /// <param name="endTime">截至时间戳，长度为10</param>
        /// <param name="page">页码</param>
        /// <param name="projectId">项目标识</param>
        /// <param name="serialNumber">设备序列号</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project/{projectId}/env/{serialNumber}")]
        ITask<AjaxResponse<List<ProjectEnvironmentsApiDto>>> GetProjectsEnvironmentPagedList(long startTime, long endTime, int page, Guid projectId, string serialNumber, int index);

        /// <summary>
        /// 获取项目塔吊运行数据
        /// </summary>
        /// <param name="startTime">起始时间戳，长度为10</param>
        /// <param name="endTime">截至时间戳，长度为10</param>
        /// <param name="page">页码</param>
        /// <param name="projectId">项目标识</param>
        /// <param name="serialNumber">黑匣子设备序列号</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project/{projectId}/crane/{serialNumber}")]
        ITask<AjaxResponse<List<ProjectCranesApiDto>>> GetProjectsCranePagedList(long startTime, long endTime, int page, Guid projectId, string serialNumber, int index);

        /// <summary>
        /// 获取项目施工升降机运行数据
        /// </summary>
        /// <param name="startTime">起始时间戳，长度为10</param>
        /// <param name="endTime">截至时间戳，长度为10</param>
        /// <param name="page">页码</param>
        /// <param name="projectId">项目标识</param>
        /// <param name="serialNumber">黑匣子设备序列号</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project/{projectId}/lift/{serialNumber}")]
        ITask<AjaxResponse<List<ProjectLiftsApiDto>>> GetProjectsLiftPagedList(long startTime, long endTime, int page, Guid projectId, string serialNumber, int index);

        /// <summary>
        /// 获取项目视频监控摄像头数据
        /// </summary>
        /// <param name="projectId">项目标识</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project/{projectId}/video")]
        ITask<AjaxResponse<List<ProjectVideosApiDto>>> GetProjectsVideoList(Guid projectId, int index);

        /// <summary>
        /// 根据摄像头获取播放地址
        /// </summary>
        /// <param name="projectId">项目标识</param>
        /// <param name="videoId">视频标识</param>
        /// <param name="index">KeyId下标</param>
        /// <returns></returns>
        [Timeout(10000)]
        [HttpGet("/api/v2/enterprise/project/{projectId}/video/{videoId}")]
        ITask<AjaxResponse<ProjectVideoPlaysApiDto>> GetProjectsVideoPlay(Guid projectId, Guid videoId, int index);
    }
}
